package com.bt.lms.ui.action.school_education.query_details;

import com.bt.lms.ui.page.school_education.query_details.PageCheckGraduate;
import com.bt.lms.ui.page.school_education.query_details.PageCheckManage;
import javafx.collections.ObservableList;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;

/**
 *
 * 就业信息按钮事件
 */
public class QueryGraduateAction implements EventHandler {

    private PageCheckManage pageCheckManage;


    public QueryGraduateAction(PageCheckManage pageCheckManage) {
        this.pageCheckManage = pageCheckManage;
    }

    @Override
    public void handle(Event event) {

        //获取里边有几个盒子
        ObservableList<Node> children = pageCheckManage.getChildren();

        HBox hBox = (HBox) children.get(0);
        ObservableList<Node> hBoxChildren = hBox.getChildren();
        hBoxChildren.remove(3);
        Label label = new Label("就业信息");
        hBoxChildren.add(label);

        PageCheckGraduate pageCheckGraduate = new PageCheckGraduate(pageCheckManage);
        children.set(2,pageCheckGraduate);

    }
}
